package com.rc.saas.tenant.service.member;

import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.common.vo.TResponse;
import com.rc.saas.tenant.mapper.member.MemberCardMapper;
import com.rc.saas.tenant.model.member.MemberCard;
import com.rc.saas.tenant.model.member.MemberCardExample;
import com.rc.saas.tenant.model.member.MemberInfo;
import com.rc.saas.tenant.model.tenant.TenantUser;
import com.rc.saas.tenant.search.member.MemberCardSearch;
import com.rc.saas.tenant.vo.member.MemberCardResult;

/**
 * @author frog
 * @date 2019/11/21
 */
public interface MemberCardService extends BaseService<Long, MemberCard, MemberCardExample, MemberCardMapper> {
    /**
     * 绑定解绑会员卡
     * @param cardId
     * @param memberInfo
     * @param user
     * @return
     */
    void bindMobile(Long cardId, MemberInfo memberInfo, TenantUser user);

    /**
     * 注销会员卡
     * @param user
     * @param card
     */
    void cancelCard(TenantUser user, MemberCard card);

    PageInfo<MemberCardResult> searchByCondition(MemberCardSearch memberCardSearch);

    MemberCard selectLastCardNo(String tenantCode);

    TResponse isBindMobile(Long memberId,String tenantCode);
}
